package com.wzcl.app.dao.model;

import com.wzcl.app.dao.model.common.Base;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import java.util.Date;

@Data
@Entity
@Table(name = "LoginRecord")
@ApiModel(value = "登录记录")
@EntityListeners(AuditingEntityListener.class)
public class LoginRecord implements Base {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;

    @ApiModelProperty(value = "登录人名")
    private String userName;

    @ApiModelProperty(value = "登录人手机")
    private String phone;

    @ApiModelProperty(value = "登录时间")
    @CreatedDate
    private Date loginTime;

    @ApiModelProperty(value = "登录IP")
    private String loginIp;

    @ApiModelProperty(value = "设备类型")
    private Integer deviceType;
}